package com.money.shell
{
	import org.puremvc.as3.multicore.interfaces.IFacade;
	import org.puremvc.as3.multicore.patterns.facade.Facade;
	import com.money.shell.controller.StartupCommand;
	public class ShellFacade extends Facade implements IFacade
	{
		/**开始puremvc框架**/
		public static const STARTUP:String="startup";
		/**菜单初始化**/
		public static const MENUINI:String="menuini";
		/**加载具体模块**/
		public static const LOADMODULE:String="loadmodule";
		
		public function ShellFacade(key:String)
		{
			super(key);
		}

		public static function getInstance(key:String):ShellFacade
		{
			if (instanceMap[key] == null)
				instanceMap[key]=new ShellFacade(key);
			return instanceMap[key] as ShellFacade;
		}

		override protected function initializeController():void
		{
			super.initializeController();
			registerCommand(STARTUP, StartupCommand);
		}

		public function startup(app:Shell):void
		{
			sendNotification(STARTUP, app);
		}
	}
}